package com.xqiapp.bean;

import java.util.Collection;

/**
 * Created by rwrwd7 on 2017/9/8.
 *
 * 分页实体容器类
 *
 */
public class PageContainer<E, K, V> implements Page<E> ,Model {

    /** 记录的总数 */
    private long totalnum = 0;

    /** 记录的总页数 */
    private int totalpage = 0;

    /** 记录集合 */
    private Collection<E> info;

    public PageContainer(long totalnum, int totalpage, Collection<E> info) {
        this.totalnum = totalnum;
        this.totalpage = totalpage;
        this.info = info;
    }

    @Override
    public long getTotal() {
        return totalnum;
    }

    @Override
    public int getPageCount() {
        return totalpage;
    }

    @Override
    public Collection<E> getRows() {
        return info;
    }

}
